<template>
    <div class="bg">
        <div class="login-container">
            <!-- 这是登录页面 -->
            <h2 class="login-title">登录界面</h2>
            <!-- 账户密码UI -->
            <form class="ipt" method='post' action="http://127.0.0.1/api/login">
                <div class="username">
                    <i v-html="icon.usericon"></i>
                    <input type="text" name="username" id="" placeholder="请输入账号">
                </div>
                <div class="password">
                    <i v-html="icon.passwordicon"></i>
                    <input type="password" name="password" placeholder="请输入密码">
                </div>
                <div class="ipt-btn">
                    <button class="login-btn" type="submit"><el-icon color="black"><ArrowRightBold /></el-icon></button>
                </div>
            </form>
        </div>
    </div>
</template>

<script setup lang="ts">
import icon from '../store/icon'

</script>

<style scoped lang="less">
.bg {
    background: url('../assets/img/login-bg-img.jpg');
    background-size: cover;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

// 登录内容
.login-container {
    background-color: #fff;
    height: 300px;
    width: 500px;

    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    // 登录内容中的标题
    .login-title {
        color: rgba(0, 0, 0, 0.6);
        font-size: 18px;
        font-weight: 600;
        font-family: 'Times New Roman', Times, serif;
    }

    // 登录内容的表单部分
    .ipt {
        .username,.password{
            display: flex;
            margin-top: 20px;
        }
        .username i,.password i{
            display: flex;
            align-items: center;
        }
        .username input,.password input{
            border-color: transparent;
            border-bottom-color: #999;
            padding-left: 1em;
            padding-right: 1em;
        }
        .username input:focus,.password input:focus{
            outline: none;
            border-bottom-color: black;
        }
        .ipt-btn {
            margin-top: 20px;
            display: flex;
            justify-content: space-evenly;
            align-items: center;

            .login-btn {
                background-color: #fff;
                height: 40px;
                width: 40px;
                border-radius: 40px;
                outline: none;
                border-color: transparent;
                color: #f0f0f0;
                cursor: pointer;
            }
            .login-btn:hover {
                background-color: #999;
                transition: all 0.5s ease;
            }
        }

    }
}
</style>